package com.xlh.dto.course;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 资源权限
 * <p>
 * Created by lx on 2019/4/10 0010.
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResourceAuthorityDTO {

    @JsonIgnore
    @ApiModelProperty(value = "操作id")
    private Long objId;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "资源类型")
    private Integer resourceType;

    @ApiModelProperty(value = "资源显示隐藏 true：显示 false：隐藏")
    private Boolean showed = true;

    @ApiModelProperty(value = "资源下载权限 true：允许下载 false：不允许下载")
    private Boolean downloaded = true;

    public Boolean getShowed() {
        return showed == null ? true : showed;
    }

    public Boolean getDownloaded() {
        return downloaded ? true : downloaded;
    }
}
